{% load ordering %}
<div id="my_items_right">
    <div id="story_by">
        <div class="user_avatar">
            <a href="{{ profile_user.get_absolute_url }}">
                {% if profile_user.avatar %}
                    <img id="avatar" src="{{ profile_user.avatar.url }}">
                {% else %}
                    <img id="avatar" src="{{ STATIC_URL }}/images/default.jpg">
                {% endif %}
            </a>
        </div>
        <div id="story_item_username">
            <div>
                <a href="{{ profile_user.get_absolute_url }}">
                    {{ profile_user.get_username }}
                </a>
            </div>
            {% if profile_user != user %}
                <div class="follow">
                    {% if user.is_authenticated %}
                        <a class="follow_link left" id="follow_link" href="#follow_user">
                            {%  with is_following=user|args:profile_user|call:"is_following"  %}
                                {% if is_following %}
                                    You follow {{ profile_user }}
                                {% else %}
                                    Follow {{ profile_user }}
                                {% endif %}
                            {% endwith %}
                        </a>
                    {% else %}
                        <a class="auth_required left" href="#">
                            Follow
                        </a>
                    {%  endif %}
                </div>
                {% if user.is_authenticated %}
                    {% include "follow_popup_right.html" with follow_user=profile_user %}
                {% endif %}
            {% endif %}
        </div>
    </div>

    <ul>
        <li>
            <div class="my_items_info">
                <strong>{{ profile_user.live_minutes_week }}</strong> Live minutes /<span>this week</span>
            </div>
            <div class="my_items_info">
                <a href="{% url my_items_root profile_user.username %}">
                    <strong>{{ profile_user.live_current }}</strong> Live broadcasts /<span>now</span>
                </a>
            </div>
        </li>
        <li>
            <div id="my_items_followers">
                <a class="{{ sub_menu.followers }}" href="{% url user_followers profile_user.username %}">
                    <strong>
                        <span id="count_followers">
                            {{ profile_user.get_followers|length }}
                        </span>
                    </strong>
                    <span>  Followers</span><br>
                </a>
                <a class="{{ sub_menu.following }}" href="{% url user_following profile_user.username %}">
                    <strong>
                        <span id="count_following">
                            {{ profile_user.get_follows|length }}
                        </span>
                    </strong>
                    <span> Following</span>
                </a>
            </div>
        </li>
        {% if user.is_authenticated %}
        <li>
            <div class="my_items_info_message">
                <strong>Invite People to 8minutes</strong><br>
                {% if user.get_google_tokens %}
                    <a href="/google_contacts/">
                {% else %}
                    <a href="/associate/google-oauth/?next=/google_contacts/">
                {% endif %}
                    <div class="message_box">Find your friends on</div>
                    <span class="gmail_contacts_s"></span>
                </a>
            </div>
        </li>
        {% endif %}
        {% if profile_user == user %}
        <li>
            <div class="my_items_info_message">
                <strong>8minutes On Mobile</strong>
                <div class="message_box">
                    Use your personalized 8minut.es email to submit news directly from your mobile phone.				<br><br>
                    Your personal email is:
                    <strong>{{ user.mobile_email }}</strong>
                    </div>
  					<form id="mobile_email" method="POST" action="/user/send_my_email/">
                         {% csrf_token %}
                         <input type="submit" class="submit_button"
                                value="&nbsp;&nbsp;Send me my email&nbsp;&nbsp;">

                    </form>
               </div>
        </li>
        {% endif %}
    </ul>
</div>
